package clueless.client;

import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class ImageTest {
	
	private JFrame frame;
	private JPanel jp;
	private JLabel jl;
	
	public ImageTest()
	{
		frame = new JFrame();
		frame.setTitle("Image Test");
		frame.setVisible(true);
		frame.setSize(400,400);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jp = new JPanel();
		frame.add(jp);
		jl = new JLabel();
		jp.add(jl);
		
		
		
		
		
		
		//frame.validate();
	}
	
	private void addImage(){
		ImageIcon imageIcon = new ImageIcon("C:\\Users\\Matthew\\Documents\\605.401\\HCI Presentation\\Clue-Less Pics\\mr green.jpg");
		Image image = imageIcon.getImage(); 
		image = image.getScaledInstance(-1, 200, Image.SCALE_SMOOTH);
		
		jl.setIcon(new ImageIcon(image));
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		ImageTest t = new ImageTest();
		t.addImage();
	}

}
